
#include "BHstring.h"
#include "Player.h"
#include "Ogre.h"
#include <string>

using namespace Ogre;

Player::Player(){}

Player::Player(ship_type _type, std::string& _name ,Vector3 _orginal_pos, Quaternion _original_ori)
{
	mLife = 10;
	mName = _name;
	mShip = new Ship(_type,_name,_orginal_pos,_original_ori,true);
}

const std::string& Player::get_name() const
{
	return mName;
}

bool Player::operator  != (const Player &p) const
{
	return (mName != p.get_name());
}
std::string Player::operator +(const std::string& str) const
{
  return mName+str;
}

void Player::update_life(int _life)
{
	mLife += _life;
	if ( mLife <= 0 )
	{
		mShip->respawn();
	} 
}



